<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>

<html>
<c:import url="/WEB-INF/module/head.jsp"/>

<body class="hold-transition skin-blue sidebar-mini" ng-app="blog" ng-controller="feedbackController"
      ng-init="findPage()">

<section class="content-header">
    <h1>
        反馈列表
        <small>全部</small>
    </h1>
    <ol class="breadcrumb">
        <li><a href="home.jsp"><i class="fa fa-dashboard"></i>首页</a></li>
        <li class="active">反馈列表</li>
    </ol>
</section>

<!-- Main content -->
<section class="content container-fluid">

    <div class="box">
        <div class="box-header">
            <div class="row">
                <div class="col-lg-4 col-sm-8 col-xs-8">
                    <div class="input-group">
                        <input ng-model="keywords" type="text" class="form-control" placeholder="请输入关键字...">
                        <span class="input-group-btn">
						  <button type="button" class="btn btn-primary btn-flat" ng-click="findPage()">搜索</button>
						</span>
                    </div>
                </div>
                <div class="col-lg-2 col-sm-4 col-xs-4">
                    <select ng-model="entity.status" ng-init="entity.isuse=''" class="form-control select2">
                        <option value="" selected>处理状态(全部)</option>
                        <option value="1">已解决</option>
                        <option value="0">未解决</option>
                    </select>
                </div>
            </div>
            <div class="row">
                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                    <button type="button" class="btn btn-sm btn-danger" ng-click="batchEditIsuse(2, '确认删除吗?')">选中项删除</button>
                    <button type="button" class="btn btn-sm btn-success" ng-click="batchEditStatus(1, '确认已解决吗?')">选中项已解决</button>
                </div>
            </div>
        </div>
        <!-- /.box-header -->
        <div class="box-body">
            <table id="example1" class="table table-bordered table-striped">
                <thead>
                <tr>
                    <th style="width: 10px;">全选<input type="checkbox" class="js_checkbox" ng-click="allIds($event, page.records)"></th>
                    <th style="min-width: 50px;">标题</th>
                    <th>反馈人</th>
                    <th>反馈内容</th>
                    <th>状态</th>
                    <th>可执行操作</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="record in page.records">
                    <td class="text-center"><input type="checkbox" class="js_checkbox" ng-click="updIds($event, record.id)"></td>
                    <td>{{record.title}}</td>
                    <td>{{record.sender}}</td>
                    <td>{{record.content}}</td>
                    <td>
                        <small ng-show="record.status == 1" class="label bg-green">已解决</small>
                        <small ng-show="record.status == 0" class="label bg-red">未解决</small>
                    </td>
                    <td>
                        <button ng-show="{{record.status == 0}}" type="button" class="btn btn-xs btn-success" ng-click="editStatus(record.id, 1, '确认已解决?')">已解决问题</button>
                        <button ng-show="{{record.status == 1}}" type="button" class="btn btn-xs btn-warning" ng-click="editStatus(record.id, 0)">未解决问题</button>
                        <button type="button" class="btn btn-xs btn-danger" ng-click="editIsuse(record.id, 2, '确认删除吗')">删除</button>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
        <!-- /.box-body -->
        <div class="box-footer clearfix">
            <ul class="pagination pagination-sm no-margin pull-right">
                <li ng-show="pageCtl.hasFirst"><a href="#">首页</a></li>
                <li ng-show="pageCtl.hasPrevious"><a href="#">&laquo;</a></li>
                <li ng-repeat="p in pageCtl.pageList" ng-class="pageCtl.current == p"><a href="#">{{p}}</a></li>
                <li ng-show="pageCtl.hasNext"><a href="#">&raquo;</a></li>
                <li ng-show="pageCtl.hasFinally"><a href="#">尾页</a></li>
            </ul>
        </div>
    </div>
    <!-- /.box -->
</section>
<button hidden="hidden" data-toggle="modal" data-target="#modal-default" id="pop-modal"></button>
<div class="modal fade" id="modal-default">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">提示</h4>
            </div>
            <div class="modal-body">
                <p>{{msg}}</p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default pull-left" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary" data-dismiss="modal">确认</button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>

</div>
<c:import url="/WEB-INF/module/js.jsp"/>

</body>
</html>